package com.lordjoe.collectiveintelligence;

import java.util.*;


/**
 * com.lordjoe.collectiveintelligence.NamedVector
 *
 * @author Steve Lewis
 * @date Feb 22, 2009
 */
public class NamedVector implements ICluster
{
    public static NamedVector[] EMPTY_ARRAY = {};
    public static Class THIS_CLASS = NamedVector.class;

    private final String m_Name;
    private final double[] m_Values;

    public NamedVector(String pName, double[] values)
    {
        m_Name = pName;
        m_Values = values;
    }

    public String getName()
    {
        return m_Name;
    }

    @Override
    public String toString()
    {
        return getName();
    }

    public int getWeight()
    {
        return 1;
    }

    public double[] getValues()
    {
        return m_Values;
    }

        public ICluster[] getParts()
    {
        ICluster[] ret = { this};
        return ret;
    }
  
    public double getDistance()
    {
         return 0;
    }

    public void addPart(ICluster c)
    {
        if (true) throw new UnsupportedOperationException("Fix This");

    }

    public void clearParts()
    {
        //if (true) throw new UnsupportedOperationException("Fix This");

    }
}
